package com.hc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hc.dao.UserDao;
import com.hc.domain.Users;
import com.hc.service.UserService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public class UserServiceImpl  implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public Boolean save(Users user) {
        return userDao.insert(user)>0;
    }

    @Override
    public Boolean update(Users user) {
        return null;
    }

    @Override
    public Boolean delete(Integer uid) {
        return null;
    }

    @Override
    public Users getById(Integer uid) {
        return userDao.selectById(uid);
    }

    @Override
    public List<Users> getAll() {
        return userDao.selectList(null);
    }
}
